<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link href="../../favicon.ico" rel="icon">

    <title>搜索结果</title>
	 <!-- Bootstrap core CSS js -->

	<link href="Home/View/assets/css/bootstrap.min.css" rel="stylesheet">
	<link href="Home/View/assets/css/play.css" rel="stylesheet">
	<link href="Home/View/assets/css/offcanvas.css" rel="stylesheet">
    <link href="Home/View/assets/css/style.css" rel="stylesheet">
	
	<script src="Home/View/assets/js/jquery.min.js"></script>
    <script src="Home/View/assets/js/bootstrap.min.js"></script>
    <script src="Home/View/assets/js/ie-emulation-modes-warning.js"></script>
<!-- 从show页登录成功后取得vid 并跳转到登录模态框--> 
 <script>
 function func(vid){
	document.getElementById("videoid").value=vid;
   document.getElementById("login").modal();
	}
 </script>
 <!-- 从show页登录成功后取得vid 并跳转到登录模态框--> 

<!-- 弹窗显示视频的资源 css和jQ-->

<!-- 弹窗显示视频的资源 css和jQ end-->
</head>

<body>﻿
<nav class="navbar navbar-fixed-top navbar-inverse">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button class="navbar-toggle collapsed" aria-expanded="false" type="button" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
     
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li><a href="index.php">首页</a></li>
								
  <?php 
      
        foreach ($getCartoonType as $one) {
            echo '<li><a href="index.php?c=list&m=index&id='.$one['tid'].'">'.$one['typename'].'</a></li>';
        } ?>
                          
          </ul>
        
      
      <form method="post" class="navbar-form navbar-left" method="post" role="search" action="index.php?c=search&m=index">
        <div class="form-group">
          <input name="key" class="form-control" type="text" placeholder="Search">
        </div>
        <button class="btn btn-default" type="submit">搜索</button>
      </form>
       <ul class="nav navbar-nav navbar-right">
       				<li class="active"><a href="#">欢迎您访问本网站</a>
				</li>
				<li><a href="#" data-toggle="modal" data-target="#login">登录</a></li>
                <li><a href="userReg2.html" data-toggle="modal" data-target="#reg">注册</a></li>
		
	
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>

<div class="container">
  <div class="row row-offcanvas row-offcanvas-right">
    <div class="col-xs-12 col-sm-12">
      <div class="row">
        <div class="col-xs-12 col-lg-12 mlist">
          <h2>搜索结果</h2> 
          <ul class="list-inline row text-center">
									
  <?php
   //echo '523723582756';
    if($result==false)
    {
      echo "<h2 style='color:black;'>未找到符合条件的结果！</h2>"; 
      echo "返回<a href='index.php'>首页！</a>";
    }
    
    else
    {
      if (array_key_exists('id', $result)) {
        $one=$result;
    echo '<li class="col-xs-6 col-md-3">
            <img src="./upload/'.$one['pic'].'" class="responsive img-thumbnail"/>

            <p><a href="index.php?c=show&m=index&id='.$one['id'].'">'.$one['name'].'</a></p>
             </li>';
        }
        else{
      foreach ($result as $one) {
            echo '<li class="col-xs-6 col-md-3">
            <img src="./upload/'.$one['pic'].'" class="responsive img-thumbnail"/>

            <p><a href="index.php?c=show&m=index&id='.$one['id'].'">'.$one['name'].'</a></p>
             </li>';
        }
      }
    }
        
        ?>
    </ul>

<nav class="text-center">
<?php 
  $totalrows = count($result);
  echo "<table align='center'><tr><td>共有{$totalrows}条记录</td></tr></table>"; 
?>
  

  &nbsp;&nbsp;首页&nbsp;&nbsp;上一页&nbsp;&nbsp;<a href="?videoname=&amp;page=1">第1页</a>&nbsp;&nbsp;<a href="?videoname=&amp;page=2">第2页</a>&nbsp;&nbsp;<a href="?videoname=&amp;page=3">第3页</a>&nbsp;&nbsp;<a href="?videoname=&amp;page=4">第4页</a>&nbsp;&nbsp;<a href="?videoname=&amp;page=2">下一页</a>&nbsp;&nbsp;<a href="?videoname=&amp;page=4">尾页</a>  
  </nav>


                </div>
                <!--/.col-xs-6.col-lg-4-->

            </div>
            <!--/row-->
        </div>
        <!--/.col-xs-12.col-sm-12-->

       
    </div>
    <!--/row-->
</div>


      <hr />

    <footer class="mlist">
    <p> 视频网站© 大连东软信息学院 2015</p>
    </footer>


<!--/.container-->


<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->


<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<!--  -->

</body></html>